package com.larry.design.behavioral.template;

/**
 * @author larry
 * @Title: design-frame
 * @Package com.larry.design.behavioral.template
 * @Description: 模板模式
 *                   父类可以实现某些方法  留一些给子类
 * @date 9/2/2111:00 AM
 */
public abstract class CookTemplate {

    public void cook(){
        heating();
        addfood();
        addsolt();
        stirfry();
        end();
    }

    public void heating(){
        System.out.println("heating......");
    }

    public abstract void addfood();

    public abstract void addsolt();

    public void stirfry(){
        System.out.println("stirfry......");
    }

    public void end(){
        System.out.println("end..........");
    }

}
